package top.andyzheng.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@SpringBootApplication(scanBasePackages = "top.andyzheng", exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
// @MapperScan(basePackages = "top.andyzheng.mapper")
public class SharePwaApplication {

	private static final String INDEX_PAGE = "index";
	
	public static void main(String[] args) {
		SpringApplication.run(SharePwaApplication.class, args);
	}
	
	@RequestMapping(value = "/")
	public String index(Model model) {
		model.addAttribute("username", "zheng");
		return INDEX_PAGE;
	}
}
